home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC Apps
/
Logic-APPLE_II_APPS.iso
/
pc
/
LOGIC Apple II 5.25" Library - DOS Part 3
/
DOS077A.dsk
/
MEMORY INTERPRETER.bas
< prev
next >
Wrap
BASIC Source File
|
2012-02-16
|
2KB
|
29 lines
0 REM MEMORY INTERPRETER BY EVERETT COLLIER
1 POKE 10,76: POKE 12,3
2 HEX$ = "300:20 C E1 A6 A1 A5 A0 20 41 F9 60 20 C E1 A5 A1 20 DA FD 60 ND823G"
3 FOR I = 1 TO LEN(HEX$): POKE 511 +I, ASC( MID$ (HEX$,I,1)) +128: NEXT : POKE 72,0: CALL -144
4 TEXT : HOME : VTAB 10: PRINT "DECIMAL OR HEX STARTING ADDRESS (D/H)?";: GET A$:N = 0: PRINT : VTAB 12: IF A$ = "H" THEN 20
5 INPUT "ENTER DECIMAL STARTING ADDRESS ";START
6 HOME : POKE 50,63: PRINT " [ EVERETT'S MEMORY INTERPRETER ] REF +0 +1 +2 +3 +4 +5 +6 +7 ADDR": POKE 50,255: POKE 34,2
7 PRINT : PRINT "REF ADDR = ";START;" = $";: POKE 11,0:SA = START: IF START >32767 THEN SA = -(65536 -START)
8 IF SA = -32768 THEN PRINT "8000": GOTO 10
9 X = USR(SA): PRINT
10 PRINT "DEC:";: POKE 11,11
11 FOR I = 0 TO 7:DEC(I) = PEEK(START +I): PRINT TAB( 6 +I *4);DEC(I);: NEXT
12 PRINT : PRINT "HEX: ";
13 FOR I = 0 TO 7:X = USR(DEC(I)): PRINT " ";: NEXT
14 PRINT : PRINT "ASC:";
15 FOR I = 0 TO 7: PRINT TAB( 6 +I *4); CHR$(DEC(I));: NEXT
16 PRINT :N = N +1: IF N <4 THEN START = START +8: GOTO 7
17 PRINT : INPUT "NEW ADDRESS (A) OR CONTINUE? ";A$: IF A$ = "N" OR A$ = "NO" THEN END
18 IF A$ = "A" THEN 4
19 START = START +8:N = 0: GOTO 7
20 INPUT "ENTER HEX STARTING ADDRESS $";A$
21 X = 0:START = 0:L = LEN(A$)
22 IF L >4 THEN PRINT : PRINT A$;" IS TOO LONG!": GOTO 21
23 FOR I = L TO 1 STEP -1:H$ = MID$ (A$,L -I +1,1)
24 IF ASC(H$) >64 AND ASC(H$) <71 THEN X = ASC(H$) -55: GOTO 26
25 X = VAL(H$)
26 START = START +X *(16 ^(I -1)): NEXT
27 GOTO 6
28 REM (C) 1980 EVERETT M COLLIER